<template>
  <view>
    <view class="logo"><image src="https://qn.boruichengyi.com/static/index/logo.png" style="width: 100%; height: 100%"></image></view>
    <view class="name">活动小程序</view>
    <view class="version">{{ version || '版本号 V1.0.01' }}</view>
    <view class="textinfo">
      <rich-text :nodes="richtext" style="text-align: center"></rich-text>
    </view>
  </view>
</template>

<script>
export default {
  onLoad() {
    this.getuseragreement();
    this.version = uni.getAccountInfoSync().miniProgram.version;
  },
  data() {
    return {
      richtext: ''
    };
  },
  methods: {
    // 获取用户协议
    async getuseragreement() {
      const res = await uni.$http.post('index/getArticleList');
      console.log(res.data.data);
      this.richtext = res.data.data[2].content;
    }
  }
};
</script>

<style lang="less">
.logo {
  box-sizing: border-box;
  width: 160rpx;
  height: 160rpx;
  text-align: center;
  border: 1px dotted #ccc;
  line-height: 160rpx;
  margin: 156rpx 295rpx 28rpx 295rpx;
}
.name {
  width: 160rpx;
  height: 44rpx;
  font-size: 32rpx;
  margin: 0 295rpx 20rpx 295rpx;
  font-family: PingFang SC, PingFang SC;
  font-weight: bold;
  color: #000000;
}
.version {
  width: 164rpx;
  height: 34rpx;
  font-size: 24rpx;
  font-family: PingFang SC, PingFang SC;
  margin: 0 293rpx 30rpx 293rpx;
  font-weight: 500;
  color: #999999;
}
.textinfo {
  width: 610rpx;
  height: 160rpx;
  font-size: 28rpx;
  font-family: PingFang SC, PingFang SC;
  font-weight: 500;
  color: #333333;
  margin: 0 70rpx;
}
</style>